<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 300px;
            height: 40px;
            animation: move 2s infinite forwards;
        }
        @keyframes move
        {
            0%{
                margin-left: 50px;
            }
            25%{
                margin-left: 300px;
            }
            50%{
                margin-left: 550px;
            }
            75%{
                margin-left: 300px;
            }
            100%{
                margin-left: 50px;
            }
        }
    </style>
</head>
<body>
    <marquee behavior="" direction="alternate" scrollamount="10">故事的小黄花，从出生那年就飘着。</marquee>
    <hr>
    <div>
        <p>故事的小黄花，从出生那年就飘着。</p>
    </div>
    <hr>
</body>
</html>